package com.jhgsys.internal.sypq.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jhgsys.internal.common.entity.BaseEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;


/**
 * 待办通知表 Entity
 *
 * @author ganjun
 * @date 2024-11-30 21:43:28
 */
@Data
@TableName("sypq_notice")
public class Notice extends BaseEntity implements Serializable {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    @Size(max = 32, message = "{noMoreThan}")
    private String id;

    /**
     * 通知类型;1：通知 2：办理
     */
    @TableField("notice_type")
    @NotBlank(message = "{required}")
    @Size(max = 2, message = "{noMoreThan}")
    private Integer noticeType;

    /**
     * 待办类型
     */
    @TableField("pending_type")
    private String pendingType;

    /**
     * 通知标题
     */
    @TableField("notice_title")
    @NotBlank(message = "{required}")
    @Size(max = 150, message = "{noMoreThan}")
    private String noticeTitle;

    /**
     * 通知内容
     */
    @TableField("notice_content")
    @NotBlank(message = "{required}")
    @Size(max = 500, message = "{noMoreThan}")
    private String noticeContent;

    /**
     * 发送时间
     */
    @TableField("send_date")
    @NotNull(message = "{required}")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date sendDate;

    /**
     * 接收时间
     */
    @TableField("receive_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date receiveDate;

    /**
     * 接收人Id
     */
    @TableField("receive_user_id")
    @NotBlank(message = "{required}")
    @Size(max = 1024, message = "{noMoreThan}")
    private String receiveUserId;

    /**
     * 接收人姓名
     */
    @TableField("receive_real_name")
    @NotBlank(message = "{required}")
    @Size(max = 1024, message = "{noMoreThan}")
    private String receiveRealName;

    /**
     * 通知状态;0：未读1：已读
     */
    @TableField("status")
    @Size(max = 2, message = "{noMoreThan}")
    private Integer status;

    /**
     * 链接
     */
    @TableField("url")
    private String url;

    /**
     * 业务id
     */
    @TableField("biz_id")
    private String bizId;

}